package main

import "fmt"

func f() func() int {
	face := 1
	current := 1
	return func() int {
		result := face
		current++
		face *= current - 1
		return result
	}
}

func main() {
	f := f()
	for i := 0; i < 3; i++ {
		fmt.Println(f())
	}

}
